package com.morningstar.qs.basic.db.bean;

import java.io.Serializable;


/**
 * This is an object that contains data related to the UserComponentEventInfo table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="UserComponentEventInfo"
 */

public class UserComponentEventInfo  implements Serializable {

/**
	 * 
	 */
	private static final long serialVersionUID = -5451982016206581735L;



/*	public static String REF = "UserComponentEventInfo";
	public static String PROP_SEC_ID = "secId";
	public static String PROP_EVENT_TIME = "eventTime";
	public static String PROP_CREATE_TIME = "createTime";
	public static String PROP_EVENT_ID = "eventId";
	public static String PROP_EVENT_TYPE = "eventType";
	public static String PROP_USER_ID = "userId";
	public static String PROP_LAST_UPDATE_TIME = "lastUpdateTime";
	public static String PROP_EVENT_INFO = "eventInfo";*/


	// constructors
	public UserComponentEventInfo () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public UserComponentEventInfo (java.lang.Integer eventId) {
		this.setEventId(eventId);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public UserComponentEventInfo (
		java.lang.Integer eventId,
		java.lang.Integer userId,
		java.lang.String secId,
		java.lang.String eventType,
		java.lang.Long eventTime,
		java.util.Date createTime,
		java.util.Date lastUpdateTime) {

		this.setEventId(eventId);
		this.setUserId(userId);
		this.setSecId(secId);
		this.setEventType(eventType);
		this.setEventTime(eventTime);
		this.setCreateTime(createTime);
		this.setLastUpdateTime(lastUpdateTime);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer eventId;

	// fields
	private int userId;
	private java.lang.String secId;
	private java.lang.String eventType;
	private java.lang.Long eventTime;
	private java.lang.String eventInfo;
	private java.util.Date createTime;
	private java.util.Date lastUpdateTime;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="identity"
     *  column="EventId"
     */
	public java.lang.Integer getEventId () {
		return eventId;
	}

	/**
	 * Set the unique identifier of this class
	 * @param eventId the new ID
	 */
	public void setEventId (java.lang.Integer eventId) {
		this.eventId = eventId;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: UserId
	 */
	public int getUserId () {
		return userId;
	}

	/**
	 * Set the value related to the column: UserId
	 * @param userId the UserId value
	 */
	public void setUserId (int userId) {
		this.userId = userId;
	}



	/**
	 * Return the value associated with the column: SecId
	 */
	public java.lang.String getSecId () {
		return secId;
	}

	/**
	 * Set the value related to the column: SecId
	 * @param secId the SecId value
	 */
	public void setSecId (java.lang.String secId) {
		this.secId = secId;
	}



	/**
	 * Return the value associated with the column: EventType
	 */
	public java.lang.String getEventType () {
		return eventType;
	}

	/**
	 * Set the value related to the column: EventType
	 * @param eventType the EventType value
	 */
	public void setEventType (java.lang.String eventType) {
		this.eventType = eventType;
	}



	/**
	 * Return the value associated with the column: EventTime
	 */
	public java.lang.Long getEventTime () {
		return eventTime;
	}

	/**
	 * Set the value related to the column: EventTime
	 * @param eventTime the EventTime value
	 */
	public void setEventTime (java.lang.Long eventTime) {
		this.eventTime = eventTime;
	}



	/**
	 * Return the value associated with the column: EventInfo
	 */
	public java.lang.String getEventInfo () {
		return eventInfo;
	}

	/**
	 * Set the value related to the column: EventInfo
	 * @param eventInfo the EventInfo value
	 */
	public void setEventInfo (java.lang.String eventInfo) {
		this.eventInfo = eventInfo;
	}



	/**
	 * Return the value associated with the column: CreateTime
	 */
	public java.util.Date getCreateTime () {
		return createTime;
	}

	/**
	 * Set the value related to the column: CreateTime
	 * @param createTime the CreateTime value
	 */
	public void setCreateTime (java.util.Date createTime) {
		this.createTime = createTime;
	}



	/**
	 * Return the value associated with the column: LastUpdateTime
	 */
	public java.util.Date getLastUpdateTime () {
		return lastUpdateTime;
	}

	/**
	 * Set the value related to the column: LastUpdateTime
	 * @param lastUpdateTime the LastUpdateTime value
	 */
	public void setLastUpdateTime (java.util.Date lastUpdateTime) {
		this.lastUpdateTime = lastUpdateTime;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.morningstar.qs.basic.db.bean.UserComponentEventInfo)) return false;
		else {
			com.morningstar.qs.basic.db.bean.UserComponentEventInfo userComponentEventInfo = (com.morningstar.qs.basic.db.bean.UserComponentEventInfo) obj;
			if (null == this.getEventId() || null == userComponentEventInfo.getEventId()) return false;
			else return (this.getEventId().equals(userComponentEventInfo.getEventId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getEventId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getEventId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}
}